from flask import Flask as _Flask

def register_blueprints(app):
    #注册蓝图
    # url   /v1/user/   /v1 拆到蓝图
    from app.api.v1 import create_buleprint_v1
    app.register_blueprint(create_buleprint_v1(),url_prefix='/v1')


def create_app():
    app=_Flask(__name__)
    app.config.from_object('app.config.setting')
    app.config.from_object('app.config.secure')

    register_blueprints(app)

    return app